package com.mayikt.integral.mapper.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
*  (Integral) 实体类
*
* @author zhangxun
* @since 2020-05-14
*/
@Data
@TableName(value = "meite_integral")
public class Integral implements Serializable {
    private static final long serialVersionUID=1L;
    /*** 主键ID*/
    @TableId(type = IdType.AUTO)
    private Integer id;

    /*** 用户ID*/
    @TableField("user_id")
    private Integer userId;

    /*** 支付ID*/
    @TableField("payment_id")
    private String paymentId;

    /*** 积分*/
    @TableField("integral")
    private Integer integral;

    /*** 是否可用*/
    @TableField("availability")
    private Integer availability;

    /*** 乐观锁*/
    @TableField("revision")
    private Integer revision;

    /*** 创建人*/
    @TableField("create_by")
    private String createBy;

    /*** 创建时间*/
    @TableField("create_time")
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    /*** 更新人*/
    @TableField("update_by")
    private String updateBy;

    /*** 更新时间*/
    @TableField("update_time")
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

}